//
// Copyright (C) [2024] Xingyun Integrated Circuit, Inc.
//
// GreenCode was a private technology asset of Xingyun Integrated Circuit， Inc （Confidential）
//  Author: Shawn.Tan
//  Date : 2025.10.28
//
//  History : Initial Version 2025.10.28
//
//
#ifndef Green_VmDirectMapControlBlock_H
#define Green_VmDirectMapControlBlock_H

#include "Enums.h"
#include "VmControlBlock.h"
#include ARCH_ENUM_HEADER

namespace Green {

  /*!
    \class VmDirectMapControlBlock
    \brief Base class for direct mapping control blocks.
  */
  class VmDirectMapControlBlock : public VmControlBlock {
  public:
    VmDirectMapControlBlock(EPrivilegeLevelType elType, EMemBankType memType); //!< Constructor with EL type and memory bank given.
    ~VmDirectMapControlBlock() override = default; //!< Destructor.
    VmDirectMapControlBlock& operator=(const VmDirectMapControlBlock& rOther) = delete; //!< Copy assignment operator not currently needed.

    Object* Clone() const override { return new VmDirectMapControlBlock(*this); } //!< Clone VmDirectMapControlBlock object.
    const char* Type() const override { return "VmDirectMapControlBlock"; }

    bool Validate(std::string& rErrMsg) const override; //!< Return true only if all initialized context are valid.
  protected:
    VmDirectMapControlBlock(const VmDirectMapControlBlock& rOther) = default; //!< Copy constructor.

    const std::string AdditionalAttributesString() const override; //!< Return addtional attributes description in a string.
  };

}

#endif
